import { createRouter as _createRouter, createWebHashHistory } from 'vue-router'


const routes = [
  {
    path: '/',
    name: 'PageView',
    redirect: '/home',
    component: () => import('@/view/PageView.vue'),
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/view/HomePage.vue'),
        meta: {
          title: '建筑模型'
        }
      },
      {
        path: '/picture',
        name: 'picture',
        component: () => import('@/view/Picture.vue'),
        meta: {
          title: '建筑采风'
        }
      },
      {
        path: '/buildinginfo',
        name: 'buildinginfo',
        component: () => import('@/view/BuildingInfo.vue'),
        props: true,
        meta: {
          title: '建筑信息'
        }
      },
      {
        path: '/constructinfo',
        name: 'constructinfo',
        component: () => import('@/view/ConstructInfo.vue'),
        meta: {
          title: '构件信息'
        }
      },
      {
        path: '/history',
        name: 'history',
        component: () => import('@/view/History.vue'),
        meta: {
          title: '历史沿革'
        }
      },
      {
        path: '/buildingfeature',
        name: 'buildingfeature',
        component: () => import('@/view/BuildingFeature.vue'),
        meta: {
          title: '建筑特色'
        }
      },
      {
        path: '/value',
        name: 'value',
        component: () => import('@/view/Value.vue'),
        meta: {
          title: '建筑特色'
        }
      },
      {
        path: '/contactus',
        name: 'contactus',
        component: () => import('@/view/ContactUs.vue'),
        meta: {
          title: '联系我们'
        }
      }
    ]
  }
]

export function createRouter() {
  return _createRouter({
    history: createWebHashHistory(),
    routes
  })
}

